import Utils (splitAll)
import qualified Data.Set as Set

combineAllAnswers :: [String] -> String
combineAllAnswers = foldl (++) ""

yesCount :: [String] -> Int
yesCount = length . Set.fromList . combineAllAnswers

parseInput :: String -> [[String]]
parseInput = splitAll [""] . lines

main = do
    input <- readFile "./input.txt"
    print . sum 
          . map yesCount 
          . parseInput $ input